app_name = 'app1'

from django.urls import path
from app1 import views

urlpatterns = [
    #     path(路径,视图函数,路由名称)
    path('index/', views.index, name='index'),  # 路由映射  将一个网址 和 一个界面对应起来
    path('show_dict/', views.show_dict, name='show_dict'),
    path('show_list/', views.show_list, name='show_list'),
    path('show_obj/', views.show_obj, name='show_obj'),
    path('show_list_for/', views.show_list_for, name='show_list_for'),
    path('show_if/', views.show_if, name='show_if'),
    path('show_if1/', views.show_if1, name='show_if1'),
    path('show_students/', views.show_students, name='show_students'),
    path('show_img/', views.show_img, name='show_img'),
    path('show_filter/', views.show_filter, name='show_filter'),
    path('fun1/', views.fun1, name='fun1'),


    path('jump/', views.jump, name='jump'),  # 展示url 跳转
    path('book/<int:bookid>/', views.book, name='book'),
    path('book1/<str:bookname>/', views.book1, name='book1'),  # str包含范围比int广
    # http://127.0.0.1:8000/app1/author/%E5%B0%8F%E5%B0%8F/blog/123/
    # http://127.0.0.1:8000/app1/author/rose/blog/123/
    path('author/<str:authorname>/blog/<int:blogid>/', views.blog, name='blog'),
    path('book2/<path:bookname>/', views.book2, name='book2'), # str是匹配不了/的, path>str>int

    path('book3/',views.book3,name='book3'),
    path('baidu/',views.baidu,name='baidu'),
    path('register/',views.register,name='register'),

    path('stu_add/',views.stu_add,name='stu_add'),
    path('query_stu_one/',views.query_stu_one,name='query_stu_one'),
    path('query_stu_m/',views.query_stu_m,name='query_stu_m'),
    path('query_stu/',views.query_stu,name='query_stu'),


    path('del_stu/<int:stu_id>/',views.del_stu,name='del_stu'),

    path('update_stu/<int:stu_id>/',views.update_stu,name='update_stu'),
]
